package com.css.zfzx.sjcj.common.platform;

import com.css.bpm.platform.api.local.PlatformAPI;
import com.css.bpm.platform.org.user.repository.entity.UserEntity;
import com.css.bpm.platform.utils.PlatformSessionUtils;

/**
 * 通过平台接口获取信息的封装
 *
 * @author leon
 * @date 2020/11/5 14:38
 */
public class Platform {

    /**
     * 获取当前登录用户信息
     *
     * @return
     */
    public static UserEntity getUser() {
        String userId = PlatformSessionUtils.getUserId();
        UserEntity user = PlatformAPI.getOrgAPI().getUserAPI().getUser(userId);
        return user;
    }
}
